#pragma once

#include <string>
#include "cg/cg.h"
#include "MyPhysics.h"
#include "MyRock.h"
#include "MyWood.h"

namespace PeanutQuest {

	class CollisionManager;

	class ShooterManager : public cg::Entity,
		public cg::IUpdateListener,
		public cg::IKeyboardEventListener
	{
	private:

		CollisionManager* _cm;

		std::string _message;
		MyPhysics _phy;
		cg::Vector3d _peanutPos;

	public:
		int woodCounter;
		int rockCounter;

		bool wood_weapon;
		bool rock_weapon;

		bool wasShot;

		ShooterManager(std::string id);
		~ShooterManager();
		
		void init();
		void update(unsigned long elapsed_millis);

		void onKeyPressed(unsigned char key);
		void onKeyReleased(unsigned char key);
		
		void rockWeapon();
		void woodWeapon();
		void shoot();

		void setMessage(std::string message);
		std::string getMessage();
	};
}